Per 10621 thumbnail autorefresh - #1113
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1113 +/- ##
==========================================
+ Coverage 52.33% 52.36% +0.02%
==========================================
Files 354 354
Lines 12093 12117 +24
Branches 2186 2191 +5
==========================================
+ Hits 6329 6345 +16
- Misses 5538 5549 +11
+ Partials 226 223 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d7506a6 to
3249b4a
Compare
|
@aasandei-vsp , can we pair on this? It is a bigger change than I expected when I picked it up! I thought the first commit would do it. |
|
This appears to be working, but a note from Claude for our discussion: "Two threads for later: the id normalization to strings (which retires isSameId), and hideItemsInCurrentFolder carrying the same parentFolder_linkId mismatch — likely swept up by the same work." |
3249b4a to
74a5094
Compare
6b23183 to
51aa47b
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
I went through the manual tests except the profile picture ones (will do those later today). They are working! I was misled by the folder-with-only-subfolders because of some recurrence (possibly?) of the scroll bug -- I had to scroll up to the top manually. Without doing that the screen looked blank. Feel free to use my dev archive to poke around with different cases, @aasandei-vsp , since you found that public behaves differently on local: https://app.dev.permanent.org/p/archive/06ms-0000
This only works for the first thumbnail of an uploaded set.
This is a more complex fix that should get in-depth review, since it changes the data service and I am not confident in it. Claude suggests that in the switch to the stela "children" endpoint we missed a couple points. We weren't correctly tracking the responses because of the string/number id mismatch, so there are some workarounds for that in here.
… from BE After upload, the thumbnail is not immediatelly generated, so we keep calling the BE until it is available. So the list item will subscribe to this refresh and populate the thumbnail whenever is available. One important thing to mention is that thumbnails should not be available for restricted shares, so making sure that we only show it after we check if the share is restricted or not is vital, that's why the isUnlistedShare variable is needed. Issue: PER-10580
…ilable This fix just bypasses a big problem we are having accross the app. We are mutating objects in place instead of replacing them, so even if the reference is the same, the object has changed. This makes any object highly unreliable for using it inside an Angular context. In this situation, we were using a pipe for rendering the thumbnails, which is the correct approach. The issue is the pipe would update when the object reference changes, which never happens in our case, even though the thumbnailUrls do. Issue: PER-10580
51aa47b to
97ee045
Compare
Thank you for the archive! I have managed to test that part too and it all works! |
We had a couple bugs preventing thumbnails from appearing immediately on upload, as they should. This is adding some perceived slowness to the app.
These changes need careful review, but seem to make thumbnails appear on upload again which is desirable.
Warning
The major issue here is that the fixes need to touch a service
DataServiceand a componentFolderPickerComponentthat are present in a lot of places and the code we introduce cannot be isolated. The fixes will need a lot of testing outside the thumbnails scope.Also, this fix just bypasses a big problem we are having accross the app. We are mutating objects in place instead of replacing them, so even if the reference is the same, the object has changed. This makes any object highly unreliable for using it inside an Angular context.
This would be the behavior for records:
https://www.loom.com/share/b3cbb52bf5bc4c03a0bf2c57d658ad83
Manual test cases
Thumbnail appears after upload
Single image
Several images at once
.zip).Leaving the folder mid-refresh
Share previews
(covered by specs — still verify once by hand, this is the highest-risk behaviour in the branch)
Listed share (preview toggle on)
assets/img/preview/. No real file content is visible anywhere on the page.Unlisted share
Public archive
Record thumbnails on first load
Folder tiles
folder_openicon rather than a broken image.perm_mediafor subfolders-only,descriptionfor mixed non-image files. No blank tiles.Choosing a profile photo or banner
Thumbnails on first open
Selected record preview in picker
The photo updates in place
Cancelling